package com.itheima.service.impl;

import com.itheima.service.UserService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Override
    public Integer save(int x, int y) {
        System.out.println("userServiceImpl is run ..." + x + ", " + y);
        /*try {
            int i = 1/0;
        } catch (Throwable e) {
            System.out.println("exception happened " + e.getMessage());
        }*/
        try {
            int i = 1 / 0;
        } catch (Throwable e) {
            System.out.println("exception is"+e.getMessage());
        } finally {
            return 100;
        }
    }
}
